use protobuf::Error as PbError;

#[derive(Debug)]
pub enum ProtoError {
    Pb(PbError),
    Buf(BufferError),
}
#[derive(Debug)]
pub struct BufferError();

impl From<PbError> for ProtoError {
    fn from(value: PbError) -> Self {
        Self::Pb(value)
    }
}

impl From<BufferError> for ProtoError {
    fn from(value: BufferError) -> Self {
        Self::Buf(value)
    }
}
